package net.bolue.sysmng.model;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import net.bolue.console.model.BusiBase;
import net.bolue.sysmng.db.DbOpUtil;
import net.bolue.sysmng.exception.BolueException;
import net.bolue.sysmng.tblbean.InsRes;
import net.bolue.web.report.RepConstants;

/**
 * 新增资源业务类
 * @author Administrator
 *
 */
public class InsResModel extends BusiBase{

	public InsResModel() {
		super();
	}

	public InsResModel(HttpServletRequest request) {
		super(request);
	}

	/**
	 * 获得新增资源
	 * @param subSys	子系统
	 * @param insertID	新增标识
	 * @return InsRes	新增基本资源
	 * @throws BolueException
	 */
	public InsRes getInsRes(String subSys,String insertID) throws BolueException{
		Map<String,Object> whereMap = new HashMap<String,Object>();
		whereMap.put("INSERTID", insertID);
		whereMap.put("SUBSYS", subSys);
		DbOpUtil dbOpUtil = new DbOpUtil(RepConstants.SYSMNG_SUBSYS_KEY);
		InsRes insRes = dbOpUtil.getOne(InsRes.class, "st_insres", null, whereMap);
		return insRes;
	}
	
}
